using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Commerce.Common;
using SubSonic;

/// <summary>
/// Business logic for the ads
/// </summary>
public static class AdController
{
    
    /// <summary>
    /// Returns all ads for a given page
    /// </summary>
    /// <param name="pageName"></param>
    /// <param name="placement"></param>
    /// <returns></returns>
    public static AdCollection GetByPage(string pageName, string placement){

        return new AdCollection().Where("pageName", pageName).Where("placement", placement).Load();
        
    }
}
